# -*- coding: utf-8 -*-
# @File  : fixture.py
# @Author: zbh
# @Date  : 2025/3/31_15:31
import pytest

a=[1,2,3,4,5]


@pytest.fixture(scope="function")
def sample_date():
    print("\n夹具的默认范围是function，每个函数都要执行一次")
    return ['a','b','c','d','e']


@pytest.fixture(scope="class")
def sample_date1():
    print("\n设置夹具的范围是class，每个类执行一次")
    return [1,2,3,4,5]


@pytest.fixture(scope="session")
def sample_date2():
    print("\n设置夹具的范围是session,整个测试会话只执行一次")
    b = "python"
    yield b
    print("\n测试用例执行完毕")
